package com.moshang.mall.cart.controller;

import com.moshang.mall.cart.interceptor.CartInterceptor;
import com.moshang.mall.cart.vo.UserInfoDto;
import com.moshang.mall.constant.AuthConstant;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpSession;

/**
 * @author moshang
 * @Package : com.moshang.mall.cart.controller
 * @date 2020-09-18
 * @Description : TODO
 **/
@Controller
public class CartController {
    @GetMapping("/cart.html")
    public String cartPage(HttpSession session){
        Object attribute = session.getAttribute(AuthConstant.LOGIN_USER);
        UserInfoDto userInfoDto = CartInterceptor.threadLocal.get();
        System.out.println(userInfoDto);
        if (attribute==null){

        }else {

        }
        return "cartList";
    }
}
